package com.hrcx.mystery.service;

import com.github.pagehelper.PageInfo;
import com.hrcx.mystery.common.PageParamRequest;
import com.hrcx.mystery.dto.MysteryConsignmentDto;
import com.hrcx.mystery.pojo.EbMysteryUserConsignment;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hrcx.mystery.vo.EbMysteryUserConsignmentVo;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author LinXiPeng
 */
public interface EbMysteryUserConsignmentService extends IService<EbMysteryUserConsignment> {

    /**
     * 寄售奖品
     *
     * @param rid   记录编号
     * @param price 用户定义的寄售价
     * @return 请求是否成功
     */
    Boolean compoundPrize(Integer rid, BigDecimal price);

    /**
     * 取消寄售奖品
     *
     * @param cid 寄售记录编号
     * @return 取消结果
     */
    Boolean cancelCompoundPrize(Integer cid);

    /**
     * 获得寄售的奖品
     *
     * @param consignmentDto   寄售的请求参数对象
     * @param pageParamRequest 分页请求参数对象
     * @return 寄售奖品的分页封装对象
     */
    PageInfo<EbMysteryUserConsignmentVo> getCompoundPrize(MysteryConsignmentDto consignmentDto, PageParamRequest pageParamRequest);
}
